﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/ControlPanel.Master" AutoEventWireup="true" CodeBehind="EditEvents.aspx.cs" Inherits="intecnologia.Admin.EditEvents" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
    
<asp:ScriptManager ID="AjaxScriptManager" runat="server">
    </asp:ScriptManager>
    
    <br />
    <br />
    <center>
        <% if (_pageMode == "add")
           {%>            
                <h2>Agregar un Evento Nuevo</h2>
        <% } else if (_pageMode == "edit") { %>
                <h2>Editar Evento</h2>
        <% } %>
    </center>
    <br />
    <table style="width: 720px; margin-left: 30px;" >
        <tr style="text-align: left;">
            <td style="width: 110px"><span style="font-weight: bold; font-size: 1.1em;">Nombre:</span></td>
            <td><asp:TextBox ID="tbName" runat="server" Width="595px"></asp:TextBox></td>
        </tr>
        <tr style="text-align: left;">
            <td style="width: 110px"><span style="font-weight: bold; font-size: 1.1em;">Descripción:</span></td>
            <td><asp:TextBox ID="tbDescription" runat="server" Width="595px" TextMode="MultiLine" Height="65px"></asp:TextBox></td>
        </tr>
        <tr style="text-align: left;">
            <td style="width: 110px"><span style="font-weight: bold; font-size: 1.1em;">Lugar:</span></td>
            <td><asp:TextBox ID="tbPlace" runat="server" Width="595px"></asp:TextBox></td>        
        </tr>
        <tr style="text-align: left;">
            <td style="width: 110px"><span style="font-weight: bold; font-size: 1.1em;">Fecha:</span></td>
            <td>
                <asp:TextBox ID="tbEventDate" runat="server"></asp:TextBox>
                <asp:Button ID="btnEventDate" runat="server" Text="Seleccionar fecha" CssClass="boton" />
            </td> 
            <ajaxToolkit:CalendarExtender runat="server"
                                          TargetControlID="tbEventDate"
                                          Format="dd/MM/yyyy"
                                          PopupButtonID="btnEventDate" />
        </tr>
        <tr>
            <td style="width: 110px"><span style="font-weight: bold; font-size: 1.1em;">Hora:</span></td>
            <td>
                <asp:DropDownList ID="ddlHour" runat="server" Width="48px"></asp:DropDownList>
                <asp:DropDownList ID="ddlMinutes" runat="server" Width="48px"></asp:DropDownList>
                <asp:DropDownList ID="ddlTimeOfDay" runat="server" Width="48px"></asp:DropDownList>
            </td>
        </tr>
    </table>
 
    <center>  
        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server"
                ErrorMessage="Formato de fecha incorrecto. Debe ser (día/mes/año)." 
                ControlToValidate="tbEventDate" 
                ValidationExpression="^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d$"
                ValidationGroup="Validate" Display="Dynamic"></asp:RegularExpressionValidator>
        
        <br />
        
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
            ErrorMessage="Debe introducir el nombre del evento." Display="Dynamic" ValidationGroup="Validate"
            ControlToValidate="tbName">
        </asp:RequiredFieldValidator>
        
        <br />
        
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
            ErrorMessage="Debe introducir la descripcion del evento." Display="Dynamic" ValidationGroup="Validate"
            ControlToValidate="tbDescription">
        </asp:RequiredFieldValidator>
        
        <br />  
        
        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
            ErrorMessage="Debe introducir una fecha." Display="Dynamic" ValidationGroup="Validate"
            ControlToValidate="tbEventDate">
        </asp:RequiredFieldValidator>
        
        <br />
        
        <asp:Button ID="btnSubmitChanges" runat="server" Text="Aceptar" 
            CssClass="boton" onclick="btnSubmitChanges_Click" ValidationGroup="Validate" />
        <asp:Button ID="btnCancel" runat="server" Text="Cancelar" CssClass="boton" 
            onclick="btnCancel_Click" />
    </center>
    <br />

</asp:Content>
